// Copyright (c) 2008 Matthew Johnson
// Licensed under the MIT License (see license.txt)
package actionml.animation {
	class RotationTweenRenderer extends PropertyTweenRenderer {
		public static function isApplicable(targetClass:Class, property:String) {
			return property == "rotation";
		}
		public function RotationTweenRenderer(target:Object, property:String, start:Number, end:Number, tween:Tween) {
			super(target, property, start, end, tween);
		}		
		public override function prepareToRender() {
			super.prepareToRender();
			if (!_tween.allowUnlimitedRotation) {
				while (_renderDistance < -180) {
					_renderDistance += 360;
				}
				while (_renderDistance > 180) {
					_renderDistance -= 360;
				}
			}
		}
	}
}